fix: custom component not trigger on dismiss function#132
fix: custom component not trigger on dismiss function#132xiaoluoboding merged 2 commits intoxiaoluoboding:mainfrom oxwazz:main
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Hey @oxwazz, I think we already resolve this issue. How to trigger the close toast function: https://github.com/xiaoluoboding/vue-sonner/blob/main/app/components/HeadlessToast.vue#L9 |
|
Hey @xiaoluoboding — yes, we can close individual toasts using |
Can you give me an example. maybe write in https://github.com/xiaoluoboding/vue-sonner/blob/main/app/components/HeadlessToast.vue |
|
I've added an example for the "Close All" functionality in out.mp4 |
Thanks, @oxwazz, The documented changes help me clearly understand the requirements and make prompt decisions. |
Description
Currently, toast.dismiss() only works with toasts created using toast() or similar built-in APIs, but not with toast.custom().
Solution
This implementation registers custom toasts in the internal toast queue, allowing them to be dismissed using toast.dismiss().
References
Originally posted by @thoriqadillah in #50